package shapes;

import interfaces.IShapeCreator;
import utilities.Logger;

public class ShapeCreatorDecorator implements IShapeCreator {

	protected IShapeCreator shapeCreator;
	
	/**
	 * @param shapeCreator
	 */
	public ShapeCreatorDecorator(IShapeCreator shapeCreator) {
		this.shapeCreator = shapeCreator;
	}

	/* (non-Javadoc)
	 * @see shapes.IShapeCreator#createShape(java.lang.String)
	 */
	@Override
	public AbstractShape createShape(String shapeInfo) {
		AbstractShape shape = shapeCreator.createShape(shapeInfo);
		Logger.logID(shape.getShapeID());
		return shape;
	}
	
}